package com.eqdd.yiqidian.rongyun.message.link;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author吕志豪 .
 * @date 17-12-31  上午8:51.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */

public class LinkContent implements Parcelable {
    String title;
    String content;
    String url;
    String imgUrl;
    String source;
    String sourceOwner;
    String articleId;

    public LinkContent(String title, String content, String url, String imgUrl, String source) {
        this.title = title;
        this.content = content;
        this.url = url;
        this.imgUrl = imgUrl;
        this.source = source;
    }

    public String getArticleId() {
        return articleId;
    }

    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    public String getSourceOwner() {
        return sourceOwner;
    }

    public LinkContent setSourceOwner(String sourceOwner) {
        this.sourceOwner = sourceOwner;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public LinkContent setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getContent() {
        return content;
    }

    public LinkContent setContent(String content) {
        this.content = content;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public LinkContent setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public LinkContent setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
        return this;
    }

    public String getSource() {
        return source;
    }

    public LinkContent setSource(String source) {
        this.source = source;
        return this;
    }

    public LinkContent() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.content);
        dest.writeString(this.url);
        dest.writeString(this.imgUrl);
        dest.writeString(this.source);
        dest.writeString(this.sourceOwner);
        dest.writeString(this.articleId);
    }

    protected LinkContent(Parcel in) {
        this.title = in.readString();
        this.content = in.readString();
        this.url = in.readString();
        this.imgUrl = in.readString();
        this.source = in.readString();
        this.sourceOwner = in.readString();
        this.articleId = in.readString();
    }

    public static final Creator<LinkContent> CREATOR = new Creator<LinkContent>() {
        @Override
        public LinkContent createFromParcel(Parcel source) {
            return new LinkContent(source);
        }

        @Override
        public LinkContent[] newArray(int size) {
            return new LinkContent[size];
        }
    };
}
